import http from '../../utils/axios'
//添加部门
export function deptAdd(query:any) {
  return http.request({
    url: '/dept/add',
    method: 'post',
    data: query
  })
}
//编辑部门
export function deptUpdate(query:any) {
  return http.request({
    url: '/dept/update',
    method: 'post',
    data: query
  })
}
//删除部门
export function deptDel(query:any) {
  return http.request({
    url: '/dept/del',
    method: 'post',
    data: query
  })
}
//部门启用跟禁用
export function deptStatus(query:any) {
  return http.request({
    url: '/dept/status',
    method: 'post',
    data: query
  })
}
//获取所有角色
export function roleList(query:any) {
  return http.request({
    url: '/role/listAll',
    method: 'post',
    data: query
  })
}
//获取公司角色
export function listNoTenantAll(query:any) {
  return http.request({
    url: '/role/listNoTenantAll',
    method: 'post',
    data: query
  })
}
//获取所有表单
export function unitFormList(query:any) {
  return http.request({
    url: '/unit-form/list',
    method: 'post',
    data: query
  })
}
//获取所有部门
export function deptList(query:any) {
  return http.request({
    url: '/dept/listAll',
    method: 'post',
    data: query
  })
}
//添加用户
export function empAdd(query:any) {
  return http.request({
    url: '/emp/add',
    method: 'post',
    data: query
  })
}
//修改用户
export function empUpdate(query:any) {
  return http.request({
    url: '/emp/update',
    method: 'post',
    data: query
  })
}
//删除用户
export function empDel(query:any) {
  return http.request({
    url: '/emp/del',
    method: 'post',
    data: query
  })
}
//根据id查询用户信息
export function empGetById(query:any) {
  return http.request({
    url: '/emp/getById',
    method: 'post',
    data: query
  })
}
//修改用户登录状态
export function empStatus(query:any) {
  return http.request({
    url: '/emp/status',
    method: 'post',
    data: query
  })
}
//重置密码
export function empResetPwd(query:any) {
  return http.request({
    url: '/emp/resetPwd',
    method: 'post',
    data: query
  })
}
//获取权限列表
export function permissionList(query:any) {
  return http.request({
    url: '/permission-src/listHierarchy',
    method: 'post',
    data: query
  })
}
//添加角色
export function rolAdd(query:any) {
    return http.request({
      url: '/role/add',
      method: 'post',
      data: query
    })
  }
  //获取角色
export function rolGetById(query:any) {
  return http.request({
    url: '/role/detail',
    method: 'post',
    data: query
  })
}
  //编辑角色
  export function roleUpdate(query:any) {
    return http.request({
      url: '/role/update',
      method: 'post',
      data: query
    })
  }
    //修改角色状态
    export function roleStatus(query:any) {
      return http.request({
        url: '/role/status',
        method: 'post',
        data: query
      })
    }
      //删除角色
  export function roleDel(query:any) {
    return http.request({
      url: '/role/del',
      method: 'post',
      data: query
    })
  }
  //获取菜单列表
export function permissionSrcList(query:any) {
  return http.request({
    url: '/permission-src/list',
    method: 'post',
    data: query
  })
}
  //添加菜单列表
  export function permissionSrcAdd(query:any) {
    return http.request({
      url: '/permission-src/add',
      method: 'post',
      data: query
    })
  }
   //修改菜单列表
   export function permissionSrcUpdate(query:any) {
    return http.request({
      url: '/permission-src/update',
      method: 'post',
      data: query
    })
  }
   //删除当前菜单
   export function permissionSrcDeleteById(query:any) {
    return http.request({
      url: '/permission-src/deleteById',
      method: 'post',
      data: query
    })
  }